import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Arrays;

public class TestException {


    public static void main(String[] args) {

        TestException exception = new TestException();
        try {
            exception.testExctpion();
        } catch (IndexOutOfBoundsException e) {
            e.printStackTrace();
        } catch (Exception e) {
            System.out.print("aa " + e.getMessage());
        }
        System.out.print("after exception");

        String callName = "13718774012";
        String callNum = "13718774012";
        if (exception.isEmpty(callName) || callNum.equals(callName)) {
            System.out.print(" callNum == callName");
        } else {
            System.out.print(" callNum != callName ");
        }

    }

    boolean isEmpty(String str) {
        return str == null || str.length() == 0;
    }

    private void testExctpion() {
//        ArrayList<Integer> arrayList = new ArrayList<>();
//        arrayList.add(1);
//        arrayList.get(100);


        ByteBuffer byteBuffer = ByteBuffer.allocate(9);
        byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
        byteBuffer.put((byte)0);
        System.out.println("buffer toString " + Arrays.toString(byteBuffer.array()));
        byteBuffer.putInt(28);
        byteBuffer.putInt(121);
        byteBuffer.flip();
        System.out.println("buffer toString " + Arrays.toString(byteBuffer.array()));

        PosnFromSatlt1Group posnFromSatlt1Group = PosnFromSatlt1Group.build(byteBuffer.array());

        System.out.println("get Group:cntr" + posnFromSatlt1Group.posnFromSatlt1Cntr + " lat" + (int)posnFromSatlt1Group.posnFromSatlt1PosnLat + " lgt:" + (int)posnFromSatlt1Group.posnFromSatlt1PosnLgt);

//        byteBuffer.putInt(1,28);
//        byteBuffer.putInt(5,121);
    }
}
